#ifndef TEXTBUBBLE_H
#define TEXTBUBBLE_H
#include"bubbleframe.h"
#include"global.h"

#include <QEvent>
#include <QTextEdit>
class TextBubble : public BubbleFrame
{
public:
    TextBubble(ChatRole role,const QString& text,QWidget * parent = nullptr);
protected:
    bool eventFilter(QObject* o,QEvent* e);
private:
    void adjustTextHeight();
    void setPlainText(const QString& text);
    void initStyleSheet();
    QTextEdit* m_pTextEdit;
};

#endif // TEXTBUBBLE_H
